package com.ruoyi.web.controller.business;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.dto.ShortSearchBody;
import com.ruoyi.common.dto.ShortSearchDto;
import com.ruoyi.common.vo.OrderVO;
import com.ruoyi.order.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/business/pachong")
@Slf4j
public class PachongController {

    @Autowired
    @Qualifier("print")
    private OrderService printService;

    @PostMapping("/short")
    public AjaxResult shortSubmit(@Validated @RequestBody ShortSearchBody shortSearchBody)
    {
        List<OrderVO> orderList = printService.fetchData(shortSearchBody);
        return AjaxResult.success(orderList);
    }



}
